package cn.dogger.easyboot.init.initEntity;

import cn.dogger.easyboot.init.annotation.InitField;
import cn.dogger.easyboot.init.annotation.InitTable;
import cn.dogger.easyboot.init.enums.FieldTypeEnums;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 操作日志记录
 *
 * @author dogger
 *  2022-07-27
 */
@Data
@InitTable(name = "sys_oper_log",remark = "操作日志记录")
public class SysOperLog{

    @InitField(remark = "日志主键",name = "oper_id",type = FieldTypeEnums.int_,keyFlag = true)
    private Long operId;

    @InitField(remark = "模块标题",name = "title",fieldLength = 50)
    private String title;

    @InitField(remark = "业务类型（0其它 1新增 2修改 3删除）",name = "business_type",type = FieldTypeEnums.int_)
    private Integer businessType;

    @InitField(remark = "方法名称",name = "method",fieldLength = 50)
    private String method;

    @InitField(remark = "请求方式",name = "request_method",fieldLength = 50)
    private String requestMethod;

    @InitField(remark = "操作类别（0其它 1后台用户 2手机端用户）",name = "operator_type",type = FieldTypeEnums.int_)
    private Integer operatorType;

    @InitField(remark = "操作人员",name = "oper_name",fieldLength = 50)
    private String operName;

    @InitField(remark = "部门名称",name = "dept_name",fieldLength = 50)
    private String deptName;

    @InitField(remark = "请求URL",name = "oper_url",fieldLength = 150)
    private String operUrl;

    @InitField(remark = "主机地址",name = "oper_ip",fieldLength = 250)
    private String operIp;

    @InitField(remark = "操作地点",name = "oper_location",fieldLength = 250)
    private String operLocation;

    @InitField(remark = "请求参数",name = "oper_param",fieldLength = 250)
    private String operParam;

    @InitField(remark = "返回参数",name = "json_result",fieldLength = 250)
    private String jsonResult;

    @InitField(remark = "操作状态（1正常 2异常）",name = "status",type = FieldTypeEnums.int_)
    private Integer status;

    @InitField(remark = "错误消息",name = "error_msg",fieldLength = 150)
    private String errorMsg;

    @InitField(remark = "操作时间",name = "oper_time",type = FieldTypeEnums.datetime_)
    private LocalDateTime operTime;

}